# 图形一
for i in range(9):
    # 打印第一到第五行
    if i < 5:
        # 打印空格
        for k in range(i, 4):
            print(end=' ')
        # 打印*号
        for j in range(i + 1):
            print('*', end=' ')
        print('')
    # 打印第六行到第九行
    else:
        for k in range(8 - i, 4):
            print(end=' ')
        for j in range(9 - i):
            print('*', end=' ')
        print('')
print('')
# 图形二
for i in range(9):
    # 打印空格
    if i < 5:
        for k in range(i, 4):
            print(end=' ')
        for j in range(2 * i + 1):
            if (j == 0 or j == 2 * i):
                print('*', end='')
            else:
                print(end=' ')
        print('')
    else:
        for k in range(8 - i, 4):
          print(end=' ')
        for j in range(2 * (8 - i)+1):
            if (j == 0 or j == 2 * (8 - i)):
                print('*', end='')
            else:
                print(end=' ')
        print('')
